/*
 * Copyright 2009 Max Kugland
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.splink.deepsplink.navigation {

	/**
	 * <code>INavigation</code> implementations which are registred with the 
	 * <code>IDeeplinkController</code> ared notfied whenever a page change occurrs.
	 * You can conventiently use <code>DeepsplinkFacade</code> or 
	 * <code>INavigationCommand</code>to register your <code>INavigation</code> 
	 * implementations.
	 * 
	 * @author Max Kugland
	 */
	public interface INavigation {
		/**
		 * Informs registered <code>INavigation</code> implementations about page changes.
		 * The select method is called by deepsplink after the the page change request has been validated and
		 * just before the request is executed.
		 * 
		 * @param id the id of the item which needs to be selected
		 * @param pageParams an optional Array of <code>PageParameter</code> instances
		 * @param changed true if the state of the navigated content changed, false if not.
		 */
		function select(id : String, pageParams : Array = null, changed : Boolean = true) : void;
	}
}
